package com.xxzuibang.day6;

public class Test01 {
    public static void main(String[] args) {
//        char[] arr = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
//                'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
//        System.out.print("[");
//        for (int i = 0; i < arr.length; i++) {
//            System.out.print(i == arr.length - 1 ? arr[i] : arr[i] + ",");
//        }
//        System.out.println("]");

        char[] chars=new char[26];
        for (int i = 0; i < chars.length; i++) {//循环26次
            chars[i]=(char)('A'+i);
        }
        //循环输出
        System.out.println("===数组的遍历===");
        System.out.print("[");
        for (int i = 0; i < chars.length; i++) {
            System.out.print(i == chars.length - 1 ? chars[i] : chars[i] + ",");
        }
        System.out.println("]");

    }
}

